#pragma once

#include <QtWidgets/QMainWindow>
#include <QThread>
#include "ui_VisCa310Ctrl.h"


namespace CA200SRVRLib
{
    class Ca200;
}
class QLocalServer;

class VisCmdProc : public QObject
{
    Q_OBJECT
public:
    VisCmdProc(QObject* parent = Q_NULLPTR);
    ~VisCmdProc();

protected Q_SLOTS:
    void serverNewConnectionHandler();

    void socketReadyReadHandler();


public:
	CA200SRVRLib::Ca200* m_ca200;
    QLocalServer *m_server;
};

class QSystemTrayIcon;
class QMenu;
class VisCa310Ctrl : public QMainWindow
{
    Q_OBJECT

public:
    VisCa310Ctrl(QWidget *parent = Q_NULLPTR);
    virtual ~VisCa310Ctrl();

private:
    Ui::VisCa310CtrlClass ui;

	QSystemTrayIcon* m_systemTray;
    QMenu* m_menu;

    VisCmdProc m_pThread;
};
